import HTMLTestRunner_PY3
import unittest
import yagmail
def report():
    r = HTMLTestRunner_PY3.HTMLTestRunner(open('zk3.html','wb'),
                                          title='c测试报告')
    return r

def emal():
    mal = yagmail.SMTP(user='2829138788@qq.com',password='ktsrrzrhxlycdfca',host='smtp.qq.com')
    mal.send(to='2829138788@qq.com',subject='zk',contents=['aa','./zk3.html'])
    mal.close()

if __name__ == '__main__':
    suite = unittest.defaultTestLoader.discover('./', 'TestCase.py')
    report().run(suite)
    emal()